<%--
  Created by IntelliJ IDEA.
  User: 飞蓬
  Date: 2018/5/19
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: 飞蓬
  Date: 2018/4/26
  Time: 21:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <jsp:include page="../js_top.jsp"/>
    <link href="<%=basePath%>/static/css/css.css" rel="stylesheet" type="text/css"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="userList">

    <style type="text/css">
        .table_report {
            width: 540px;
            margin: 15px auto;
        }

        .table_report tr td {
            line-height: 31px;
            color: #63666d;
            font-size: 14px;
            font-family: Arial, Helvetica, "微软雅黑";
        }

        .table_report tr td a {
            width: 185px;
            height: 38px;
            line-height: 38px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
            border-color: #b7bacb;
            display: block;
            font-size: 14px;
            font-family: "微软雅黑";
            text-shadow: 0 0px 0 rgba(0, 0, 0, 0) !important;
            background: #b7bacb url(/static/img/images/table_report_icon1.png) no-repeat 70px center;
            text-align: center;
            color: #fff;
            cursor: pointer;
            text-indent: 20px;
            float: left;
            margin: 0 20px 0 0;
        }

        .table_report tr td a:hover, .table_report tr:last-child td:last-child a:hover {
            background-color: #0fb1d6;
            text-decoration: none;
        }

        input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus {
            border-color: #f59942;
        }
    </style>
</head>
<body>


<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <table class="table  table-striped table-hover table_report">

                <tr style="margin-top: 50px">
                    <span>评分：</span><br/>
                    <select class="form-control" id="score" name = "score">
                        <option value="1">1分</option>
                        <option value="2">2分</option>
                        <option value="3">3分</option>
                        <option value="4">4分</option>
                        <option value="5">5分</option>
                    </select>
                </tr>
                <tr>
                    <span>就诊用时(小时)：</span>
                    <input type="text" class="form-control" id="diagnosetime" value="${orderupdate.diagnosetime}" name = "diagnosetime" placeholder="请输入本次就诊用时（小时）..." />
                </tr>
                <tr>
                    <span>评价：</span>
                    <input type="text" class="form-control" id="evaluate" value="${orderupdate.evaluate}" name = "evaluate" placeholder="请输入真实的评价..." />
                </tr>

                <tr>

                    <td colspan="10">
                        <a style="margin-left: 66px" href="javascript:save();">确定</a>
                        <a href="javascript:top.Dialog.close();">取消</a>
                    </td>

                </tr>
            </table>
        </div>

    </div>
</div>
</body>


<script type="text/javascript">
    $(function () {
        $("#score").val("${orderupdate.score}");

    });

    function save() {
        var id = "${order.id}";
        var doctorid = "${orderupdate.doctorid}";
        var score = $("#score option:selected").val();
        var diagnosetime = $("#diagnosetime").val();
        var evaluate = $("#evaluate").val();
        if(score == "" || score == null){
            layer.msg('请填写评分！！');
            return false;
        }
        if(diagnosetime == "" || diagnosetime == null){
            layer.msg('请填写诊断用时！！');
            return false;
        }
        $.ajax({
            cache: true,
            type: "POST",
            url: '<%=basePath%>hs/order/savefeedback.do',
            data: {"id":id, "doctorid": doctorid,"score":score,"diagnosetime":diagnosetime,"evaluate":evaluate},
            async: false,
            error: function (request) {
                layer.msg('<span style="color:white;">评价出错 !</span>');
            },
            success: function (data) {
                if (data = true) {
                    layer.msg('<span style="color:white;">评价成功 !</span>');
                    top.Dialog.close();
                } else {
                    layer.msg('<span style="color:white;">评价出错 !</span>');
                }
            }
        });

    }



</script>
</html>
